File

interface File

File data.

Depending on how the File instance is created, it can correspond to one of the following:

  1. File path, if the file is selected from an <input type="file"> element in a submitted form.
  2. File bytes, if the request is created via the JavaScript API, and a file is passed as a part of the multipart/form-data body.

Types

Link copied to clipboard
class Builder
A builder of File.

Properties

Link copied to clipboard

The file value as an array of bytes, if any.

Link copied to clipboard

A MIME type of the file content.

Link copied to clipboard

The file value as a path, if any.

Functions

Link copied to clipboard
Returns the file value as an array of bytes.
Link copied to clipboard
open fun contentType(): String
Returns the content type.
Link copied to clipboard
open fun name(): String
Returns the file name.
Link copied to clipboard
Creates a new File builder.
Link copied to clipboard
Returns the file value as a file path.